import request from '@/http/request'

// 渠道列表
export const $getChannelList = (params:any) => {
    return request.request({
      url: '/api/activity/channel/getChannelList',
      method: 'post',
      data: params
    })
  }
  // 删除渠道 '/api/activity/channel/channelDelete'
  export const $delChannel = (params:any) => {
    return request.request({
      url: '/api/activity/channel/channelDelete',
      method: 'post',
      data: params
    })
  }

  // 导出活动渠道码  /api/activity/channel/export
  export const $exportChannel = (params:any) => {
    return request.request({
      url: '/api/activity/channel/export',
      method: 'post',
      data: params
    })
  }  
  //  是否开启距离  '/api/activity/channel/distance/limit'
  export const $distanceLimit = (params:any) => {
    return request.request({
      url: '/api/activity/channel/distance/limit',
      method: 'post',
      data: params
    })
  }

  // 新建自建渠道码
  export const $addOneSelfBuild = (params:any) => {
    return request.request({
      url: '/api/activity/channel/addOneSelfBuild',
      method: 'post',
      data: params
    })
  }

  // 编辑自建渠道码
  export const $updateOneSelfBuild = (params:any) => {
    return request.request({
      url: '/api/activity/channel/updateSelfBuildChannel',
      method: 'post',
      data: params
    })
  }

  // 新建自建渠道码列表
  export const $selfBuildList = (params:any) => {
    return request.request({
      url: '/api/activity/channel/getSelfBuildChannelList',
      method: 'post',
      data: params
    })
  }
  

  // 查看自建渠道码详情

    export const $selfBuildDetail = (params:any) => {
    return request.request({
      url: '/api/activity/channel/getSelfBuildChannelDetail',
      method: 'post',
      data: params
    })
  }
// 自建码停用启用

   export const $changeSelfBuild = (params:any) => {
    return request.request({
      url: '/api/activity/channel/updateSelfBuildChannelStatus',
      method: 'post',
      data: params
    })
  }

  // 自建渠道码多个导入
   export const $importSelfBuildFile = (data:any) => {
    return request.request({
      url: '/api/activity/channel/importSelfBuildFile',
      method: 'post',
      data: data
    })
  }

  export const $exportSelfBuildChannel = (params:any) => {
    return request.request({
      url: '/api/activity/channel/exportSelfBuildChannel',
      method: 'post',
      data: params
    })
  }

  // 导出渠道码信息
    export const $exportSelfBuildChannelList = (params:any) => {
    return request.request({
      url: '/api/activity/channel/exportSelfBuildChannelList',
      method: 'post',
      data: params
    })
  }